package com.xiyang.boot;

import com.xiyang.boot.config.SplashScreenCustom;
import com.xiyang.boot.view.LoginView;
import de.felixroske.jfxsupport.AbstractJavaFxApplicationSupport;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class JavafxSpringboot3Application extends AbstractJavaFxApplicationSupport {

    public static void main(String[] args) {
        //launch(JavafxSpringboot3Application.class, LoginView.class,args);
        launch(JavafxSpringboot3Application.class, LoginView.class,new SplashScreenCustom(), args);
    }

    @Override
    public void beforeInitialView(Stage stage, ConfigurableApplicationContext ctx) {
//        stage.initStyle(StageStyle.TRANSPARENT); /* 透明标题栏 */
//        stage.setResizable(false); /* 设置窗口不可改变 */
        stage.setAlwaysOnTop(true); /* 窗口始终悬浮 */
    }
}
